//
//  MKAnnotation.m
//  map
//
//  Created by dlios on 15/10/23.
//  Copyright © 2015年 shangshuai. All rights reserved.
//

#import "MKAnnotation.h"

@implementation MKAnnotation

- (NSString *)title
{
    return @"您的位置";
}

- (NSString *)subtitle
{
    NSMutableString *ret = [NSMutableString new];
    if (_state) {
        [ret appendString:_state];
    }
    
    if (_city) {
        [ret appendString:_city];
    }
    
    if (_city && _state) {
        [ret appendString:@", "];
    }
    
    if (_streetAddress && (_city || _state || _zip)) {
        [ret appendString:@","];
    }
    
    if (_streetAddress) {
        [ret appendString:_streetAddress];
    }

    if (_zip) {
        [ret appendString:[NSString stringWithFormat:@", %@", _zip]];
    }

    return ret;
}

@end
